<div class="mainpage">
    <div *ngIf="!isDisplay" class="resumetable">
        <p-table [columns]="cols" [value]="resumes">
            <ng-template pTemplate="header" let-columns>
                <tr>
                    <th *ngFor="let col of columns">
                        {{col.header}}
                    </th>
                    <th>
                        编辑
                    </th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-rowData let-columns="columns">
                <tr>
                    <td *ngFor="let col of columns">
                            {{rowData[col.field]}}
                    </td>
                    <td>
                        <button pButton type="button" (click)="renderResume(rowData)" label="详情"></button>&nbsp;
                        <button pButton type="button" (click)="deleteResume(rowData)" label="删除" class="ui-button-danger"></button>
                    </td>
                </tr>
            </ng-template>
        </p-table>
    </div>

    <div *ngIf="isDisplay" class="page">
        <div class="bulletin">
            <div class="clickref clearf">
                <div class="abox fl">
                    <a (click)="back()">返回</a>
               </div>
               <div class="abox fl">
                    <a (click)="generatePDF()">下载pdf</a>
               </div>
            </div>
        </div>
        <article>
            <section>
                <h1 >{{ name }}<span *ngIf="name==''">Name</span></h1>
                <h2>
                    <pre>{{ sex }}<span *ngIf="sex==''">Sex</span>  |  {{ grade }}<span *ngIf="grade==''">Grade</span>  |  {{ academy }}<span *ngIf="academy==''">Academy</span></pre>
                </h2>
                <h2>phone: {{ phone }}<span *ngIf="phone==null">&nbsp;&nbsp;&nbsp; Phone-Number</span></h2>
                <h2>e-mail: {{ email }}<span *ngIf="email==''">&nbsp;&nbsp;&nbsp; E-mail</span></h2>
            </section>
            <section>
                <p-selectButton [options]="choices" [(ngModel)]="choice"></p-selectButton>
            </section>
    
            <section>
                <h3><span><i class="fa fa-th-large" aria-hidden="true" style="color:#2f54eb"></i></span>
                    科研经历</h3>
                <div [innerHTML]="experience">
                </div>
                <span *ngIf="experience=='' || experience==null">
                    <pre>   参加过什么科技竞赛</pre>
                    <pre>   制作过什么科技作品</pre>
                </span>
            </section>
    
            <section>
                <h3><span><i class="fa fa-th-large" aria-hidden="true" style="color:#2f54eb"></i></span>
                    技术特长</h3>
                <div [innerHTML]="expert">
                </div>
                <span *ngIf="expert=='' || expert==null">
                    <pre>   擅长使用什么软件</pre>
                    <pre>   研究过什么算法</pre>
                    <pre>   会使用单片机吗</pre>
                </span>
            </section>
    
            <section class="box5">
                <h3><span><i class="fa fa-th-large" aria-hidden="true" style="color:#2f54eb"></i></span>
                    为什么想加入机器人队</h3>
                <div [innerHTML]="why">
                </div>
                <span *ngIf="why=='' || why==null">
                    <pre>   职业方向？</pre>
                    <pre>   兴趣？</pre>
                    <pre>   消磨时间？</pre>
                </span>
            </section>
           
            <section class="box6">
                <h3><span><i class="fa fa-th-large" aria-hidden="true" style="color:#2f54eb"></i></span>
                    建议或意见</h3>
                <div [innerHTML]="suggestion">
                </div>
                <span *ngIf="suggestion=='' || suggestion==null">
                    <pre>   你心目中的机器人队是什么样子的？</pre>
                    <pre>   你希望在这里收获什么？</pre>
                    <pre>   对机器人队有什么建议？</pre>
                </span>
            </section>
        </article>
    </div>   
</div>

